package com.elong.android.specialhouse.activity;

import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.elong.android.specialhouse.R;
import com.elong.android.specialhouse.base.BaseVolleyActivity;
import com.elong.android.specialhouse.entity.response.OrderDetail;
import com.elong.framework.netmid.response.IResponse;

public abstract class OrderDetailActivity extends
		BaseVolleyActivity<IResponse<?>> {

	/* 订单编号 */
	protected TextView mOrderNumTv;
	/* 订单状态 */
	protected TextView mOrderStatusTv;
	/* 公寓名称 */
	protected TextView mHouseTtitleTv;
	/* 入住时间 */
	protected TextView mCheckinTimeTv;
	/* 总房费用 */
	protected TextView mHousePriceTv;

	/* 入住人 */
	protected TextView mClientNameTv;
	/* 入住人数 */
	protected TextView mClientCountTv;
	/**
	 * 取消规则
	 */
	protected TextView mCancelRuleTv;
	/* 查看订单日志 */
	protected TextView mOrderLogTv;
	/* 底部按钮的layout ，貌似房东没有按钮选项 */
	protected LinearLayout mBottomButtonLayout;
	/* 有差异的界面 */
	protected LinearLayout mDifferentLayout;
	private LinearLayout mLayoutDetail;
	protected Button mBtnNegative;
	protected Button mBtnOther;
	protected Button mBtnGoToPay;
	protected String mGorderId;
	protected OrderDetail mOrderDetail;

	@Override
	protected void initContentView() {
		setContentView(R.layout.act_order_detail_activity);
		mOrderNumTv = (TextView) findViewById(R.id.tv_order_number);
		mOrderStatusTv = (TextView) findViewById(R.id.tv_order_state);
		mHouseTtitleTv = (TextView) findViewById(R.id.tv_house_name);
		mCheckinTimeTv = (TextView) findViewById(R.id.tv_checkin_time);
		mHousePriceTv = (TextView) findViewById(R.id.tv_order_price);
		mClientNameTv = (TextView) findViewById(R.id.tv_checkin_people);
		mClientCountTv = (TextView) findViewById(R.id.tv_checkin_people_num);
		mCancelRuleTv = (TextView) findViewById(R.id.tv_cancel_rules);
		mOrderLogTv = (TextView) findViewById(R.id.tv_go_to_order_detail);
		mBottomButtonLayout = (LinearLayout) findViewById(R.id.ly_bottom_button);
		mBottomButtonLayout.setVisibility(View.GONE);
		mDifferentLayout = (LinearLayout) findViewById(R.id.different_layout);
		mLayoutDetail = (LinearLayout) findViewById(R.id.order_detail_layout);
		mLayoutDetail.setVisibility(View.GONE);
		mBtnNegative = (Button) findViewById(R.id.btn_order_detail_negative);
		mBtnOther = (Button) findViewById(R.id.btn_order_detail_btn1);
		mBtnGoToPay = (Button) findViewById(R.id.btn_go_to_pay);
		initview();

	}

	protected abstract void initview();

	protected void showDetail() {
		mLayoutDetail.setVisibility(View.VISIBLE);
	}

}
